package com.shopmall.goods.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shopmall.goods.entity.GoodsInfo;

import java.util.List;
import java.util.Map;


public interface GoodsInfoService {
    /**
     * 分页查询
     * @param goodsInfo
     * @return
     */
    IPage<GoodsInfo> pageList(GoodsInfo goodsInfo);

    /**
     * 新增或修改
     * @param goodsInfo
     * @return
     */
    int addOrUpdate(GoodsInfo goodsInfo);

    /**
     * 删除
     * @param id
     * @return
     */
    int deleteById(Integer id);

    List<GoodsInfo> getGoods();

    List<GoodsInfo> getGoodsById(List<Integer> id);

    Map<String,  Object> frontIndex(Integer type, Integer limit, Integer page);

    Map<String, Object> frontDetail(Integer id, String type);
}
